﻿<Tree TItem="string"
	  ShowIcon
	  DefaultExpandAll
	  DefaultSelectedKeys="@(new[]{"0-0-0"})">
	<SwitcherIconTemplate>
		@switcherIcon
	</SwitcherIconTemplate>
	<Nodes>
		<TreeNode Title="parent 1" Key="0-0" Icon="@IconType.Outline.Smile">
			<TreeNode Title="leaf" Key="0-0-0" Icon="@IconType.Outline.Meh" />
		</TreeNode>
		<TreeNode Title="leaf" Key="0-0-1">
			<IconTemplate Context="node">
				@if (node.Selected)
				{
					<Icon Type="@IconType.Fill.Frown"/>
				}
				else
				{
					<Icon Type="@IconType.Outline.Frown" />
				}
			</IconTemplate>
		</TreeNode>
	</Nodes>
</Tree>

@code {
	RenderFragment switcherIcon =@<Icon Type="@IconType.Outline.Down" />;
}
